//
//  CollectionViewHeaderView.m
//  Linkage
//
//  Created by LeeJay on 16/8/22.
//  Copyright © 2016年 LeeJay. All rights reserved.
//  代码下载地址https://github.com/leejayID/Linkage

#import "CollectionViewHeaderView.h"

@implementation CollectionViewHeaderView

- (id)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.backgroundColor=[UIColor whiteColor];
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(10, MainW/4-40, MainW - 120, 20)];
        self.title.textColor=Red_Color;
        self.title.textAlignment=0;
        _cycleScrollerView = [SDCycleScrollView cycleScrollViewWithFrame:CGRectMake(10, 0, MainW-120, MainW/3-40) delegate:self placeholderImage:[UIImage imageNamed:@"banner_bj"]];
    _cycleScrollerView.bannerImageViewContentMode=UIViewContentModeScaleAspectFill;
        _cycleScrollerView.tag=100;
        _cycleScrollerView.pageControlAliment = SDCycleScrollViewPageContolAlimentCenter;
        _cycleScrollerView.autoScrollTimeInterval =3.;
        [self addSubview:_cycleScrollerView];
        //self.title.backgroundColor=Gray_Color;
        self.title.font=[UIFont systemFontOfSize:15];
        [self addSubview:self.cycleScrollerView];
        [self addSubview:self.title];
        //self.title.frame=CGRectMake(self.cycleScrollerView.bsg_x, self.cycleScrollerView.bsg_bottom+5, MainW-120, 20);
    }
    return self;
}

@end
